package com.wanmait.baohan.service.Impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.baohan.mapper.RoleMapper;
import com.wanmait.baohan.pojo.Role;
import com.wanmait.baohan.service.RoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Set;

/**
 * TODO
 *
 * @author 打豆豆
 * @version 1.0
 * @date 2021/1/7 15:50
 * @description:
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RoleServiceImpl implements RoleService {
    @Resource
    private RoleMapper roleMapper;

    @Override
    public Set<String> findAllRolesByStaffId(Integer id) {
        return roleMapper.selectAllRolesByStaffId(id);
    }

    @Override
    public List<Role> selectFindAll() {
        return roleMapper.selectFindAll();
    }

    @Override
    public void insert(Role object) {

    }
    @Override
    public List<Role> findAllRolesByStaffId2(Integer id) {
//        QueryWrapper<Role> queryWrapper = new QueryWrapper<>();
//        queryWrapper.
//        queryWrapper.eq("staff_id", id);
//        return roleMapper.selectList(queryWrapper);
        return roleMapper.selectAllRolesByStaffId2(id);
    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Role object) {

    }

    @Override
    public Role findById(Integer id) {
        return null;
    }

    @Override
    public List<Role> findAll() {
        return null;
    }

    @Override
    public List<Role> findAll(Role object) {
        return null;
    }

    @Override
    public PageInfo<Role> findPage(int pageNum) {
        return null;
    }

    @Override
    public PageInfo<Role> findPage() {
        return null;
    }

    @Override
    public PageInfo<Role> findPage(int pageNum, Role object) {
        return null;
    }

    @Override
    public PageInfo<Role> findPage(Role object) {
        return null;
    }
}
